package com.xyyhome.web.system.domain;

import javax.persistence.*;

/**
 * Created by ty850 on 2017/5/21.
 */
@Entity
@Table(name = "y_s_authority", schema = "xyyhome", catalog = "")
public class YSAuthority {
    private String ysaCode;
    private String ysaName;
    private String ysaRemark;

    @Id
    @Column(name = "ysa_code", nullable = false, length = 36)
    public String getYsaCode() {
        return ysaCode;
    }

    public void setYsaCode(String ysaCode) {
        this.ysaCode = ysaCode;
    }

    @Basic
    @Column(name = "ysa_name", nullable = true, length = 36)
    public String getYsaName() {
        return ysaName;
    }

    public void setYsaName(String ysaName) {
        this.ysaName = ysaName;
    }

    @Basic
    @Column(name = "ysa_remark", nullable = true, length = 50)
    public String getYsaRemark() {
        return ysaRemark;
    }

    public void setYsaRemark(String ysaRemark) {
        this.ysaRemark = ysaRemark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        YSAuthority that = (YSAuthority) o;

        if (ysaCode != null ? !ysaCode.equals(that.ysaCode) : that.ysaCode != null) return false;
        if (ysaName != null ? !ysaName.equals(that.ysaName) : that.ysaName != null) return false;
        if (ysaRemark != null ? !ysaRemark.equals(that.ysaRemark) : that.ysaRemark != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = ysaCode != null ? ysaCode.hashCode() : 0;
        result = 31 * result + (ysaName != null ? ysaName.hashCode() : 0);
        result = 31 * result + (ysaRemark != null ? ysaRemark.hashCode() : 0);
        return result;
    }
}
